home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1996-01-17 | 2.4 KB | 78 lines |
- ' ************************************* Commands used:
- ' * * Set Rain Colour
- ' * Amcaf Examples * Fcircle
- ' * Set Rain Colour 4 V1.0 * Turbo Draw
- ' * Written by Chris Hodges *
- ' * *
- ' *************************************
- '
- ' *** WARNING!!! ***
- ' This program will only work, if the AMOSPro.Lib Patch has been installed.
- ' Otherwise you'll get a very corrupted display.
- '
- ' First, hide the mouse cursor for niceness.
- Hide
- ' Then open a 4 coloured screen. This one will be displayed in the background.
- Screen Open 1,336,256,4,0
- Curs Off : Flash Off : Paper 0 : Pen 1 : Cls 0
- ' Hide it.
- Palette 0,0,0,0
- ' Arrange the screen.
- Screen Display 1,128,40,320,200
- ' Use a x-offset that isn't a multiple of 16. This is a workaround for the
- ' dual playfield bug.
- Screen Offset 1,1,0
- ' Draw some nice circles.
- For A=0 To 100
- Ink Rnd(2)+1 : Extension_8_05E6 Rnd(320),Rnd(256),Rnd(7)+2
- Next
- ' Now open the second screen.
- Screen Open 0,640,400,8,0
- Curs Off : Flash Off : Paper 0 : Pen 1 : Cls 0
- ' Hide it.
- Palette 0,0,0,0,0,0,0,0
- Screen Display 0,128,40,320,256
- ' Draw some thick lines...
- For A=1 To 40
- X1=Rnd(640) : Y1=Rnd(400) : X2=Rnd(640) : Y2=Rnd(400)
- C=Rnd(6)+1
- Extension_8_1016 X1,Y1 To X2,Y2,C
- Extension_8_1016 X1-1,Y1 To X2-1,Y2,C
- Extension_8_1016 X1+1,Y1 To X2+1,Y2,C
- Extension_8_1016 X1,Y1-1 To X2,Y2-1,C
- Extension_8_1016 X1,Y1+1 To X2,Y2+1,C
- Next
- ' and some circles.
- For A=1 To 40
- Ink Rnd(6)+1 : Extension_8_05E6 Rnd(640),Rnd(400),Rnd(50)+10
- Next
- ' Create the mirror-rainbow.
- Set Rainbow 0,0,16,"","",""
- ' This is the new modulo value. Note that the formula is like this:
- ' ((VisibleWidth-RealWidth)-(VisibleWidth*ShrinkFactor)/8-2.
- '
- ' *** Try different shrink factors! ***
- For A=0 To 15
- Rain(0,A)=((320-640)-640*1)/8-2
- Next
- ' Change the Rainbow Colour to the modify the even bitplanes modulo value.
- Extension_8_1330 0,($108-$180)/2
- Wait Vbl
- ' Enable Dual Playfield and set the palette.
- Dual Playfield 0,1
- Palette 0,$F00,$F0,$F,$F0F,$FF0,$FF,$FFF,$88,$880,$80,$808
- Wait Vbl
- ' Limit the mouse and display the mirror-rainbow.
- Limit Mouse 128,40 To 287,239
- Rainbow 0,0,240,56
- ' Move the screen around using hardware scrolling.
- Repeat
- Wait Vbl
- XM=X Mouse-128 : YM=Y Mouse-40
- Screen Offset 0,XM*2+1,YM
- Until Inkey$=Chr$(27) or Mouse Key<>0
- ' Clean the display.
- Rainbow Del : View
- Screen Close 0
- Screen Close 1
- End